import request from '@/utils/request'

// 查询科室列表
export function departmentList(query) {
  return request({
    url: '/base/department/list',
    method: 'get',
    params: query
  })
}

// 新增科室列表
export function department(data) {
  return request({
    url: '/base/department',
    method: 'post',
    data: data
  })
}

// 修改科室列表
export function ecthDepartment(data) {
  return request({
    url: '/base/department',
    method: 'put',
    data: data
  })
}

// 获取科室详细信息
export function departmentbyId(id) {
  return request({
    url: `/base/department/${id}`,
    method: 'get',
  })
}

// 删除科室
export function delDepartment(id) {
  return request({
    url: `/base/department/${id}`,
    method: 'delete'
  })
}

// 启用科室
export function addenabled(id) {
  return request({
    url: `/base/department/enabled/${id}`,
    method: 'get',
  })
}